const state = () => ({
  modal: false, //弹框
  barModal: false,
  axisBarModal: false,
  axisType: 'x',
  contentSet: false,
  tooltipModal: false,
  layoutModal: false,
  requestModal: false,
  requestCardModal: false,
  listCardModal: false,
  codeDesightModal: false,
})
const getters = {
  getSeriesModal: (state) => state.modal,
  getBarSeriesModal: (state) => state.barModal,
  getBarAxisModal: (state) => state.axisBarModal,
  getAxisType: (state) => state.axisType,
  modalSwitch: (state) => state.modal,
  getContentSet: (state) => state.contentSet,
  getTooltipModal: (state) => state.tooltipModal,
  getLayoutModal: (state) => state.layoutModal,
  getRequestModal: (state) => state.requestModal,
  getRequestCardModal: (state) => state.requestCardModal,
  getListCardModal: (state) => state.listCardModal,
  getCodeDesightModal: (state) => state.codeDesightModal,
}
const mutations = {
  modalSwitch(state) {
    state.modal = !state.modal
  },
  modalSwitchBar(state) {
    state.barModal = !state.barModal
  },
  modalSwitchAxis(state) {
    state.axisBarModal = !state.axisBarModal
  },
  switchAxisType(state, data) {
    state.axisType = data
  },
  switchContentSet(state) {
    state.contentSet = !state.contentSet
  },
  switchTooltipModal(state) {
    state.tooltipModal = !state.tooltipModal
  },
  switchLayoutModal(state) {
    state.layoutModal = !state.layoutModal
  },
  switchRequest(state) {
    state.requestModal = !state.requestModal
  },
  switchCodeDesight(state) {
    state.codeDesightModal = !state.codeDesightModal
  },
  switchCardRequest(state) {
    state.requestCardModal = !state.requestCardModal
  },
  switchListCardModal(state) {
    state.listCardModal = !state.listCardModal
  },
}
const actions = {
  modalSwitch({ commit }) {
    commit('modalSwitch')
  },
  modalSwitchBar({ commit }) {
    commit('modalSwitchBar')
  },
  modalSwitchAxis({ commit }) {
    commit('modalSwitchAxis')
  },
  modalSwitchContent({ commit }) {
    commit('switchContentSet')
  },
  modalLayoutModal({ commit }) {
    commit('switchLayoutModal')
  },
  modalSwitchRequest({ commit }) {
    commit('switchRequest')
  },
  modalSwitchListCard({ commit }) {
    commit('switchCardRequest')
  },
  modalSwitchCardRequest({ commit }) {
    commit('switchListCardModal')
  },
  modalSwitchCodeDesight({ commit }) {
    commit('switchCodeDesight')
  },
  modalSwitchTooltip({ commit }) {
    commit('switchTooltipModal')
  },
}
export default { state, getters, mutations, actions }
